package cn.edu.zjicm.wordsnet_d.adapter;

import java.util.ArrayList;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import cn.edu.zjicm.wordsnet_d.data.OneWord;
import cn.edu.zjicm.wordsnet_d.fragment.WordDetailFragment;

public class WordDetailAdapter extends FragmentStatePagerAdapter{
	
	private ArrayList<OneWord> mWordList;
	
	public WordDetailAdapter(FragmentManager fm, ArrayList<OneWord> wordList) {
		super(fm);
		mWordList = wordList;
	}

	@Override
	public Fragment getItem(int position) {
		return new WordDetailFragment(mWordList.get(position));
	}

	@Override
	public int getCount() {
		return mWordList.size();
	}
}
